package com.scaffold.springmvc.dao;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.scaffold.springmvc.entity.UserInfo;

/**
 * 用户DAO
 * @author wangjg
 */
@Repository
public class UserInfoDAO extends BasicBizDAO<UserInfo, Long> {

	public List<UserInfo> queryList(String keyword) {
		Query query = this.createQuery("from User where username like ?", '%'+keyword+'%');
		query.setCacheable(true);
		return query.list();
	}

}
